<template>
  <!-- 分页 -->
  <div style="text-align: center; margin-top: 20px">
    <el-pagination
      background
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="name.pageNum"
      :page-size="name.PageSize"
      layout="total, prev, pager, next"
      :total="totalCount"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  props: {
    name: {
      type: Object,
      default: () => {},
    },
    totalCount: {
      type: Number,
      default: null,
    },
  },
  methods: {
    handleSizeChange(res) {
      this.$emit("NamePageSize", res);
    },
    handleCurrentChange(res) {
      this.$emit("NamePageNum", res);
    },
  },
};
</script>

<style>
</style>